package com.flyco.modules.oms.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.flyco.common.aspect.annotation.Dict;
import com.flyco.poi.excel.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class OmsOrderExcel {

    @Excel(name = "方向", width = 30)
    private String regionAndTown;

    @Excel(name = "距离(km)", width = 15)
    private Integer distance;

    @Excel(name = "订单号", width = 30)
    private String id;

    @Excel(name = "经销商", width = 25)
    private String companyName;

    @Excel(name = "渠道", width = 25)
    private String channelName;


    @Excel(name = "销售", width = 20)
    private String saleUserName;

    @Excel(name = "订单状态", width = 20)
    private String statusJX_dictText;

    @Excel(name = "下单时间", width = 30, format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @Excel(name = "发货时间", width = 30, format = "yyyy-MM-dd HH:mm:ss")
    private Date deliveryTime;

    @Excel(name = "订单金额", width = 15)
    private java.math.BigDecimal payAmount;

    @Excel(name = "收货人", width = 15)
    private String receiverName;

    @Excel(name = "联系电话1", width = 15)
    private String receiverPhone;

    @Excel(name = "联系电话2", width = 15)
    private String phone2;

    @Excel(name = "所在地", width = 35)
    private String provinceAndCityAndRegion;

    @Excel(name = "详细地址", width = 35)
    private String receiverDetailAddress;

    @ApiModelProperty(value = "镇")
    private String town;

    private String receiverCity;
    private String receiverProvince;
    private String receiverRegion;

    public String getProvinceAndCityAndRegion() {
        return receiverProvince + receiverCity + receiverRegion + (town == null ? "" : town);
    }

    public String getRegionAndTown(){
        return  receiverRegion + (town == null ? "" : town);
    }

}
